<script lang="ts" setup>
import { reactive } from 'vue'
import { ElFormItem, ElInput } from 'element-plus'
const formList = reactive<FormList>([
  {
    label: '普通插槽',
    type: 'slot',
    prop: 'slot1',
    value: '普通插槽',
    rule: [{ required: true, message: '请输入普通插槽', trigger: 'blur' }]
  }
])
const submitForm = (formData: any) => {
  console.log(formData)
}
</script>
<template>
  <XyAddForm isCard :formList="formList" @submit-form="submitForm">
    <template #slot1="{ formData, c }">
      <el-form-item :label="c.label" :prop="c.prop">
        <el-input v-model="formData[c.prop]" placeholder="请输入内容" />
      </el-form-item>
    </template>
  </XyAddForm>
</template>
